package com.atguigu.webflux.entity;

import com.fasterxml.jackson.annotation.JsonProperty;
import org.springframework.data.relational.core.mapping.Table;

import java.time.Instant;
import java.util.List;
import java.util.Optional;


@Table("t_flight")
public class FlightDO extends BaseModel {
    private String depart;
    private String departDate;
    private String arrive;
    private String returnDate;
    private int numPassengers;
    private String seatPref;
    private String seatType;
    private int advanceDiscount;
    private Long userId;

    public FlightDO() {
        super();
    }

    public FlightDO(String depart, String departDate, String arrive, String returnDate, int numPassengers, String seatPref, String seatType, int advanceDiscount, Long userId) {
        this.depart = depart;
        this.departDate = departDate;
        this.arrive = arrive;
        this.numPassengers = numPassengers;
        this.returnDate = returnDate;
        this.seatPref = seatPref;
        this.seatType = seatType;
        this.advanceDiscount = advanceDiscount;
        this.userId = userId;
    }

    public FlightDO(Long id, Instant createdAt, Instant updatedAt, String depart, String departDate, String arrive, String returnDate, int numPassengers, String seatPref, String seatType, int advanceDiscount, Long userId) {
        super(id, createdAt, updatedAt);
        this.depart = depart;
        this.departDate = departDate;
        this.arrive = arrive;
        this.numPassengers = numPassengers;
        this.returnDate = returnDate;
        this.seatPref = seatPref;
        this.seatType = seatType;
        this.advanceDiscount = advanceDiscount;
        this.userId = userId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getDepart() {
        return depart;
    }

    public void setDepart(String depart) {
        this.depart = depart;
    }

    public String getDepartDate() {
        return departDate;
    }

    public void setDepartDate(String departDate) {
        this.departDate = departDate;
    }

    public String getArrive() {
        return arrive;
    }

    public void setArrive(String arrive) {
        this.arrive = arrive;
    }

    public String getReturnDate() {
        return returnDate;
    }

    public void setReturnDate(String returnDate) {
        this.returnDate = returnDate;
    }

    public int getNumPassengers() {
        return numPassengers;
    }

    public void setNumPassengers(int numPassengers) {
        this.numPassengers = numPassengers;
    }

    public String getSeatPref() {
        return seatPref;
    }

    public void setSeatPref(String seatPref) {
        this.seatPref = seatPref;
    }

    public String getSeatType() {
        return seatType;
    }

    public void setSeatType(String seatType) {
        this.seatType = seatType;
    }

    public int getAdvanceDiscount() {
        return advanceDiscount;
    }

    public void setAdvanceDiscount(int advanceDiscount) {
        this.advanceDiscount = advanceDiscount;
    }
}
